package com.yanqu.road.server.cmd.activity.union.task;

import com.yanqu.road.pb.union.cross.CrossUnionActivityTaskProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.activity.UnionActivityTaskMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.GameProtocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = GameProtocol.S_UNION_ACTIVITY_TASK_SYNC_DATA_FROM_CROSS, desc = "跨服同步商会任务进度")
public class SyncUnionActivityTaskFromCrossCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        CrossUnionActivityTaskProto.SyncUnionActivityTaskMsg msg = CrossUnionActivityTaskProto.SyncUnionActivityTaskMsg.parseFrom(packet.getBytes());
        UnionActivityTaskMgr.updateOnlinePlayerData(msg);
    }

}
